package com.spi.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.spi.mapper.UserMapper;
import domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RequestMapping("/admintest")
@RestController
public class AdmiTestController {

    @Autowired
    private UserMapper userMapper ;

    public static List<User> list = new ArrayList<>();

    @RequestMapping("/test01")
    public void test01(){
        System.out.println("执行。。。");
        while (true){
            User user= new User() ;
            user.setId(1);
            user.setName("小兰");
            user.setAge("30");
            user.setHobby("篮球");
            System.out.println(user);
            list.add(user);
            userMapper.insert(user);
        }
    }
}
